package com.example.happiness.mapper;

import com.example.happiness.pojo.OrderDispatch;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDispatchMapper {
    int deleteByPrimaryKey(Integer opid);

    int insert(OrderDispatch record);

    int insertSelective(OrderDispatch record);

    OrderDispatch selectByPrimaryKey(Integer opid);

    int updateByPrimaryKeySelective(OrderDispatch record);

    int updateByPrimaryKey(OrderDispatch record);

    @Select("select opid, orderid, eid, proportion from order_dispatch where orderid = #{orderid}")
    OrderDispatch findbyorderid(String orderid);

    @Select("select orderid from order_dispatch where eid=#{eid}")
    List<OrderDispatch> getOrderid(String eid);
}